Clover coverage report - Enterprise Web Services - 1.0
Coverage timestamp: Mon May 30 2005 17:10:32 CEST
file stats: LOC: 175   Methods: 12
NCLOC: 55   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
ServiceReferanceImpl.java 50% 73.3% 75% 72.4%
coverage coverage
 1   
 /*
 2   
  * Copyright 2001-2004 The Apache Software Foundation.
 3   
  * 
 4   
  * Licensed under the Apache License, Version 2.0 (the "License");
 5   
  * you may not use this file except in compliance with the License.
 6   
  * You may obtain a copy of the License at
 7   
  * 
 8   
  *      http://www.apache.org/licenses/LICENSE-2.0
 9   
  * 
 10   
  * Unless required by applicable law or agreed to in writing, software
 11   
  * distributed under the License is distributed on an "AS IS" BASIS,
 12   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13   
  * See the License for the specific language governing permissions and
 14   
  * limitations under the License.
 15   
  */
 16   
 package org.apache.geronimo.ews.ws4j2ee.context.webservices.client;
 17   
 
 18   
 import org.apache.geronimo.ews.ws4j2ee.context.webservices.client.interfaces.ServiceReferanceContext;
 19   
 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFHandler;
 20   
 
 21   
 import javax.xml.namespace.QName;
 22   
 import java.util.Vector;
 23   
 
 24   
 /**
 25   
  * @author Srinath Perera(hemapani@opensource.lk)
 26   
  * @see org.apache.geronimo.ews.ws4j2ee.context.webservices.client.interfaces.ServiceReferance;
 27   
  */
 28   
 public class ServiceReferanceImpl implements ServiceReferanceContext {
 29   
     /**
 30   
      * Service Reference Name. This defines a logical name for the
 31   
      * reference that is used in the client source code. It is recommended,
 32   
      * but not required that the name begin with service/*.
 33   
      */
 34   
     private String servicerefName;
 35   
     /**
 36   
      * Service type: The service-interface element defines the
 37   
      * fully qualified name of the JAXRPC Service Interface class
 38   
      * returned by the JNDI lookup.
 39   
      */
 40   
     private String serviceInterface;
 41   
     /**
 42   
      * WSDL definition (optional). The wsdl-file element specifies a
 43   
      * location of the WSDL description of the service. The location
 44   
      * is relative to the root of the module. The WSDL description may
 45   
      * be a partial WSDL, but must at least include the portType and
 46   
      * binding elements. The WSDL description provided by the developer
 47   
      * is considered a template that must be preserved by the
 48   
      * assembly/deployment process. In other words, the WSDL description contains
 49   
      * a declaration of the application�s dependency on portTypes, bindings, and QNames.
 50   
      * The WSDL document must be fully specified, including the service and port elements,
 51   
      * if the application is dependent on port QNames
 52   
      * (e.g. uses the Service.getPort(QName,Class) method). The developer must
 53   
      * specify the wsdl-file if any of the Service methods declared
 54   
      * in section 4.2.2.4 or 4.2.2.5 are used
 55   
      */
 56   
     private String wsdlFile;
 57   
 
 58   
     private String sei;
 59   
     /**
 60   
      * Service Port. If the specified wsdl-file has more than
 61   
      * one service element, the developer must specify the service-qname.
 62   
      */
 63   
     private QName servcieQName;
 64   
     /**
 65   
      * Ports. The developer declares requirements for container
 66   
      * managed port resolution using the portcomponent-ref element.
 67   
      * The port-component-ref elements are resolved to a WSDLport by
 68   
      * the container. See Chapter 4 for a discussion of container
 69   
      * managed port access.
 70   
      */
 71   
     private String portComponetlink;
 72   
     /**
 73   
      * JAX-RPC Mapping. The developer specifies the correlation
 74   
      * of the WSDL definition to the interfaces using the jaxrpc-mapping-file element.
 75   
      * The location is relative to the root of the module. The same mapping file must
 76   
      * be used for all interfaces associated with a wsdl-file. The developer must
 77   
      * specify the jaxrpc-mapping-file if the wsdl-file is specified.
 78   
      */
 79   
     private String jaxrpcmappingFile;
 80   
     /**
 81   
      * Handlers. A developer may optionally specify handlers associated with the
 82   
      * service-ref using the handler element.
 83   
      */
 84   
     private Vector handlers = new Vector();
 85   
 
 86   
     /**
 87   
      * @return
 88   
      */
 89  6
     public String getJaxrpcmappingFile() {
 90  6
         return jaxrpcmappingFile;
 91   
     }
 92   
 
 93   
     /**
 94   
      * @return
 95   
      */
 96  0
     public QName getServcieQName() {
 97  0
         return servcieQName;
 98   
     }
 99   
 
 100   
     /**
 101   
      * @return
 102   
      */
 103  2
     public String getServiceInterface() {
 104  2
         return serviceInterface;
 105   
     }
 106   
 
 107   
     /**
 108   
      * @return
 109   
      */
 110  2
     public String getServicerefName() {
 111  2
         return servicerefName;
 112   
     }
 113   
 
 114   
     /**
 115   
      * @return
 116   
      */
 117  6
     public String getWsdlFile() {
 118  6
         return wsdlFile;
 119   
     }
 120   
 
 121   
     /**
 122   
      * @param string
 123   
      */
 124  6
     public void setJaxrpcmappingFile(String string) {
 125  6
         jaxrpcmappingFile = string;
 126   
     }
 127   
 
 128   
     /**
 129   
      * @param name
 130   
      */
 131  0
     public void setServcieQName(QName name) {
 132  0
         servcieQName = name;
 133   
     }
 134   
 
 135   
     /**
 136   
      * @param string
 137   
      */
 138  6
     public void setServiceInterface(String string) {
 139  6
         serviceInterface = string;
 140   
     }
 141   
 
 142   
     /**
 143   
      * @param string
 144   
      */
 145  6
     public void setServicerefName(String string) {
 146  6
         servicerefName = string;
 147   
     }
 148   
 
 149   
     /**
 150   
      * @param string
 151   
      */
 152  6
     public void setWsdlFile(String string) {
 153  6
         wsdlFile = string;
 154   
     }
 155   
 
 156   
     /* (non-Javadoc)
 157   
      * @see org.apache.geronimo.ews.ws4j2ee.context.webservices.client.interfaces.ServiceReferance#addHandler(org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFHandler)
 158   
      */
 159  0
     public void addHandler(WSCFHandler handler) {
 160  0
         this.handlers.add(handler);
 161   
     }
 162   
 
 163   
     /* (non-Javadoc)
 164   
      * @see org.apache.geronimo.ews.ws4j2ee.context.webservices.client.interfaces.ServiceReferance#getHandlers()
 165   
      */
 166  4
     public WSCFHandler[] getHandlers() {
 167  4
         WSCFHandler[] wscfhandlers = new WSCFHandler[handlers.size()];
 168  4
         for (int i = 0; i < wscfhandlers.length; i++) {
 169  0
             wscfhandlers[i] = (WSCFHandler) handlers.get(i);
 170   
         }
 171  4
         return wscfhandlers;
 172   
     }
 173   
 
 174   
 }
 175